﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LowLevelGraphics.Filter
{
    /// <summary>
    /// With n = Inf, shrinks objects to points. 
    /// It removes pixels so that objects without holes shrink to a point,
    /// and objects with holes shrink to a connected ring
    /// halfway between each hole and the outer boundary. 
    /// This option preserves the Euler number.
    /// </summary>
    /// <remarks>See http://www.johnloomis.org/ece563/notes/BinaryImages/morph/morph.html to see what result we should get</remarks>
    public class Shrink : BaseImageFilter
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Shrink"/> class.
        /// </summary>
        public Shrink()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Shrink"/> class.
        /// </summary>
        /// <param name="_shrink">The _shrink.</param>
        internal Shrink(Shrink _shrink)
        {
        }

        /// <summary>
        /// This is used to clone a filter, each filter must implement it's own clone functionality
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new Shrink(this);
        }
    }
}
